var family = new Swiper('.family .type1.swiper-container', {
    effect: 'coverflow',
    grabCursor: true,
    centeredSlides: true,
    slidesPerView: 'auto',
    loop: true,
    slidesPerView: 1.75,
    coverflow: {
        rotate: 0,
        stretch: 0,
        depth: 100,
        modifier: 1,
        slideShadows: true
    },
    prevButton: '.swiper-button-prev',
    nextButton: '.swiper-button-next',
})

var dom = $('.family .type2')
var family = []
for (var i = 0; i < dom.length; i++) {
    var el = $(dom).eq(i);
    family[i] = new Swiper(el.find('.swiper-container'), {
        slidesPerView: 3,
        paginationClickable: true,
        loop: true,
        prevButton: el.find('.swiper-button-prev'),
        nextButton: el.find('.swiper-button-next'),
        onSlideChangeEnd: function(swiper) {
            swiper.wrapper.parents('.swiper-wrap').find('.cover .text .cs1 .cell').html(swiper.wrapper.find('.swiper-slide-active .cont').html())
            console.log(swiper.wrapper.find('.swiper-slide-active .cont').attr('data-img'));
            swiper.wrapper.parents('.swiper-wrap').find('.cover').css('background-image', 'url(' + swiper.wrapper.find('.swiper-slide-active .cont').attr('data-img') + ')')
        }
    })
}